{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b70dd0d2",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## A quantum lie detector for Hardy's paradox"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "45bb2276",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Hello! I'm Maria and I've been using Qiskit to understand quantum paradoxes. If you haven't already, take a look at my video \"[Quantum Lie Detector: How to Win Two Truths and a Lie](https://www.youtube.com/watch?v=kLdvDDHLvOA)\" on the Qiskit YouTube channel or my blog post \"[How to Build a Quantum Lie Detector with Quantum Computers](https://qisk.it/3LcdmVs)\" on the Qiskit Medium blog. There, I explain Hardy's paradox, which shows how classical reasoning breaks down for entangled particles. This was proposed to show a new type of quantum spooky-action-at-a-distance, also known as non-locality, in a stronger way than using Bell inequalities (Again, if you aren’t familiar with these terms, be sure to read my [blog post](https://medium.com/qiskit/how-to-build-a-quantum-lie-detector-with-quantum-computers-464d6456c5ec). \n",
    "\n",
    "In this Jupyter notebook, I'm going to show you the code to build a quantum lie detector using Qiskit, so you can see for yourself where the classical reasoning breaks down. "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "07f69f75",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Let's play a game of two quantum truths and a lie. Imagine we have two entangled qubits in the state |00> + |01> + |10>, and I give one to Alice and one to Bob. Then Carol tells us three statements about the outcomes that Alice and Bob will get when they measure their qubits. Two of these are true, and one is a lie. You can check each of Carol's statements using the quantum lie detector. "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8de14c91",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "![Alice_Bob_Carol](new_Alice_Bob_Carol.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "519ea603",
   "metadata": {},
   "source": [
    "You can input whether Alice and Bob measure in their qubits in the x-basis or z-basis, and a measurement outcome that Carol thinks should be forbidden.\n",
    "\n",
    "1. If Alice and Bob both measure their qubits in the z-basis, the outcome |11> is forbidden.\n",
    "\n",
    "Run the code for the Quantum Lie Detector below, and input \"z\" for Alice's basis, \"z\" for Bob's basis, and \"11\" for the forbidden outcome. You will find that the statement is true. \n",
    "\n",
    "Now Carol's second statement: \n",
    "\n",
    "2. If Alice measures in z- and Bob measures in x-, the |0 -> state is forbidden. And vice-versa: if Alice measures in x- and Bob in z-, |-0> is forbidden. \n",
    "\n",
    "For the x-basis measurements, an outcome of 0 corresponds to |+> before measurement, and 1 corresponds to |->. So when Alice measures in z and Bob measures in x, |01> is forbidden. Now try checking this - it's true! And if Bob measures in z, and Alice in x, then |10> should be forbidden, which is also true. \n",
    "\n",
    "Now you can test Carol's final statement.\n",
    "\n",
    "3. If Alice and Bob both measure in the x-basis, then the |--> state is forbidden. \n",
    "\n",
    "This corresponds to an x-measurement outcome of |11> being forbidden. \n",
    "\n",
    "Have a go at checking this - it is a lie! "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4a719e9f",
   "metadata": {},
   "outputs": [],
   "source": [
    "from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister\n",
    "import numpy as np\n",
    "from qiskit.providers.aer import QasmSimulator\n",
    "simulator = QasmSimulator()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bdb76ca2",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [],
   "source": [
    "# Quantum lie detector\n",
    "\n",
    "from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister\n",
    "import numpy as np\n",
    "from qiskit.providers.aer import QasmSimulator\n",
    "simulator = QasmSimulator()\n",
    "\n",
    "hardy_circuit = QuantumCircuit(2)\n",
    "hardy_circuit.initialize(np.array([1, 1, 1, 0])/np.sqrt(3))\n",
    "hardy_circuit.measure_all()\n",
    "\n",
    "def truth_lie(alice, bob) -> QuantumCircuit:\n",
    "    qr = QuantumRegister(2, 'q')\n",
    "    cr = ClassicalRegister(2, 'c')\n",
    "    qc = QuantumCircuit(qr, cr)\n",
    "    \n",
    "    hardy_circuit.initialize(np.array([1, 0, 1, 1])/np.sqrt(3))\n",
    "    \n",
    "    if alice == \"x\": \n",
    "        qc.h(0)\n",
    "    if bob == \"x\":\n",
    "        qc.h(1)\n",
    "    qc.measure(qr[0],cr[0])\n",
    "    qc.measure(qr[1],cr[1])\n",
    "    return qc\n",
    "\n",
    "a = input(\"What basis does Alice measure in? Type z for z-basis, or x for x-basis.\")\n",
    "b = input(\"What basis does Bob measure in? Type z for z-basis, or x for x-basis.\")\n",
    "\n",
    "truth_lie = truth_lie(a,b)\n",
    "\n",
    "truth_lie_job = simulator.run(truth_lie, shots=1000)\n",
    "truth_lie_result = truth_lie_job.result()\n",
    "truth_lie_counts = truth_lie_result.get_counts(truth_lie)\n",
    "\n",
    "result = sorted(truth_lie_counts.keys())\n",
    "\n",
    "guess = input(\"Which state will never occur?\")\n",
    "\n",
    "toggle = 0 \n",
    "\n",
    "for i in range(len(result)):\n",
    "    if result[i]== guess: \n",
    "        print(\"The statement was a LIE.\")\n",
    "        print(\"There is finite chance of the result:\")\n",
    "        print(guess)\n",
    "        toggle = 1\n",
    "        \n",
    "if toggle == 0: \n",
    "    print(\"The statement was a TRUTH.\")\n",
    "    print(\"There is no chance of the result:\")\n",
    "    print(guess)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ba07d19c",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Carol's quantum lie is at the root of Hardy's paradox, which was proposed in 1992 by Lucien Hardy. I'm going to explain how Hardy's original paradox can be mapped onto Carol's three statements, and how these translate to the quantum circuits I used to build my quantum lie detector."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6fdc2367",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Hardy's original thought experiment involved two overlapping interferometers - which can split particles into a superposition of states, and merge them back into one state again. We then pass a particle through one of the interferometers and an antiparticle through the other. Where the interferometers overlap, the particle and antiparticle will annihilate each other - and not be detected at the end. Hardy realised that according to quantum theory, there is a finite chance of measuring an outcome that seems to suggest both particles went down the same path, but without annihilating each other - which should be impossible! "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "602e9673",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "![title](image.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c279c2aa",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "We can present the particle and antiparticle as qubits, with 0 being one path down the interferometer, and 1 being the other. Then the joint state of the qubits before they are measured needs to have a term where the particles have both gone down the same path missing - let's say this is the |11> term. So, before the qubits are measured, they are in the state |00> + |01> + |10>. We can create this state using the initialize method in qiskit."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "1bc1ed66",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAACoCAYAAAAb366wAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAbdklEQVR4nO3deVhTZ6IG8DfskU2BIogrAgqRHbcqW1VklGpHUcdR56mt4kXUQVtre20F63WrVFxG6dWZtrYdR1lm0LE6iopcK+qVAkVxQWqt4igKanFDIHD/4JoaQYkK+ZKT9/c8Pk9ycnK+F5GXzy8nJ7KGhoYGEBGRpBiJDkBERK2P5U5EJEEsdyIiCWK5ExFJEMudiEiCWO5ERBLEcicikiCWOxGRBLHciYgkiOVORCRBLHciIgliuRMRSRDLnYhIgljuREQSxHInIpIgljsRkQSx3ImIJIjlTkQkQSx3IiIJMhEdgIie39mzZ1vc509/+hNmzZr1zH169+7dWpFIx3DmTiRRGzZsEB2BBGK5ExFJEMudiEiCWO5EEpWeni46AgnEciciki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069YNa9aswZUrV2BqagpPT0+kpqaqvdj7sm7eqoKNlSXPayeiNqEzp0Iaovr6eo2uQUFE9LxY7kREEsRpIxGRBLHciYgkiOVORCRBLHciIgliuRMRSRDLnYhIgljuREQSxHInIpIgljsRkQSx3ImIJIjlTkQkQSx3IiIJYrkTEUkQy52ISIJY7kREEsRyJyKSIJY7EZEEsdyJiCSI5U5EJEEsdyIiCWK5ExFJEMudiEiCWO5ERBLEcicikiCWOxGRBLHciYgkiOVORCRB/wdRgcjvT18XAgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 478.079x204.68 with 1 Axes>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Preparing the circuit\n",
    "\n",
    "hardy_circuit = QuantumCircuit(2)\n",
    "hardy_circuit.initialize(np.array([1, 1, 1, 0])/np.sqrt(3))\n",
    "hardy_circuit.measure_all()\n",
    "\n",
    "hardy_circuit.draw(output=\"mpl\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66599fd6",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "We can find out the gates needed to create this state on a quantum computer by using the Qiskit transpiler, which shows the z-rotations, root-x gates and C-NOT gates we need."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "50771328",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAACyCAYAAABC8wdjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAxiUlEQVR4nO3deVhUZf/H8feAgKKguKOogYoiyOJubpiKe5ZbpfWYmdujltliZYtaWamVlWVlm2nlmmglprnwaC4FioqCpmSK+64IKtvvD35SIyDDNgfGz+u6vJw5555zPnM7R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VEREREZulYldEREREbJaKXRERERGxWSp2RURERMRmqdgVEREREZulYldEREREbJaKXRERERGxWSp2RURERMRmqdgVEREREZulYldEREREbJaKXRERERGxWSp2RURERMRmqdgVEREREZulYldEREREbJaKXRERERGxWSp2RURERMRmqdgVEREREZulYldEREREbJaKXRERERGxWSp2RURERMRmqdgVEREREZulYldEREREbJaKXRERERGxWSp2RURERMRmqdgVEREREZulYldEREREbNb/AThI3oo4sD2NAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 906.838x204.68 with 1 Axes>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from qiskit import transpile\n",
    "\n",
    "from qiskit.providers.aer import AerSimulator\n",
    "from qiskit.test.mock import FakeParis\n",
    "\n",
    "backend_sim = AerSimulator.from_backend(FakeParis())\n",
    "transpile(hardy_circuit, backend_sim).draw(output='mpl', idle_wires=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8b9fe12f",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Now we give the first qubit to Alice, and the second qubit to Bob (so Alice is detecting the particle and Bob is detecting the antiparticle). \n",
    "\n",
    "Carol's first statement says that if Alice and Bob both measure their qubits in the z-basis, then at least one will get 0. We can see this directly from the state we have prepared, |00> + |10> + |01>, and confirm it by looking at the outcomes of running our quantum circuit. There is no 11 term.  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "0d646af9",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcQAAAE8CAYAAABensFrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAiEUlEQVR4nO3df5yVdZ338ddHCMIFNn4EOIICyg8BHRp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ArhdyXwPPAShe9/fBB4BHgDcBzwmDME1aTFcbONwgemLRTOJ/5rZr5Y3O4cYHdmLihXrereIuINwIXAnwPTgV1AA/AEcENmLi5XbV3NQOxmIuLbwFTg3ygE4lAKkyImUwjG/9F00ltq0sZx8yYKx80m4KbMfLhsBarbKo5E7Wo+e7TYY3w9hdnK04AXe3MQNjEQu5Hi3SB2UZj2vLBZ23HATODjwHjgfZn5y7IVqm7lIMfNGArHzcXA8cAHPG7UUkT8E4Xe3xPA+szc2co2Q4rnpXvtNYjgLNPuZgqwFtjb1JAF6zPzh8C5wO+BC8pTnrqpto6bDZl5L4XjZhceN2ohIj5I4QPTV4EHgJsi4vyIODEiBhS3GQj8S3G2e68NQzAQu5s1FM7//H1ETCgOWxyQmXuB7wB/Uo7i1G153Oi1ejvwDaAKuI3C7PXvUjj3fFVEvJ3CuemzM/PJslVZIgZiN5KZe4AvAgOAu4C/jIgxEfFHABFxNDCXwvVCEuBxo9emeO3hWuD3mbkmM7+SmScDp1G4VdtHKFy7+o/08gvym3gOsRuKiGnA1cB5FL7hohZ4FngHhZmDHz8SPq2pYzxu1FHFe9+OLN6jtB/wcovJNe8Hvg9UZeavylRmyRiI3VhxKv05wJ9RuPxiGXCvt9zSwXjc6HAUh9wjMxsj4mLglsw8utx1lYKB2EM0XVhd7jrUs3jc6HBExJVAn8y8qdy1lIKBKElqVfFWgI1HyocqA1GSJJxlKkkSYCBKkgQYiJIkAQaiJEmAgShJEgD/H612vJ/9yFd/AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Running the circuit \n",
    "\n",
    "from qiskit.providers.aer import QasmSimulator\n",
    "simulator = QasmSimulator()\n",
    "\n",
    "job = simulator.run(hardy_circuit, shots=8000)\n",
    "result = job.result()\n",
    "counts = result.get_counts(hardy_circuit)\n",
    "\n",
    "from qiskit.visualization import plot_histogram\n",
    "plot_histogram(counts)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d9b4a052",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Carol's second statement says that if Alice does a z-measurement and gets 0, then Bob must have |+>. This is true since we can write the quantum state as: \n",
    "\n",
    "|00> + |10> + |01>\n",
    "\n",
    "= |0>|+> + |10> \n",
    "\n",
    "\n",
    "Similarly, if Bob does a z-measurement and gets 0, then Alice must have |+>, since we can also write the state as: \n",
    "\n",
    "|+>|0> + |01>\n",
    "\n",
    "We can test this out by running a quantum circuit where Alice measures z and Bob measures x. There's no 01 outcome, indicating that every time Alice got 0, Bob got |+>. "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "110653c6",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "|00> + |10> + |01>\n",
    "\n",
    "= |0>|+> + |10> \n",
    "\n",
    "= |+>|0> + |01>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "1a38592b",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaQAAACoCAYAAACv+Zr6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAcFElEQVR4nO3deVxVdeL/8ReC7LgHCooLiyAIiEtqCrikpqalaDnpb7IMQ3RG27SfJmTjUlnozKQz+WjRynEEv2POTI5pKT+L/OUa44rYOAiZC+kIKorA9w/HWwjK1eCeA/f9fDx6PC7nnnM+bzR5c7bPdSgvLy9HRETEYA2MDiAiIgIqJBERMQkVkoiImIIKSURETEGFJCIipqBCEhERU1AhiYiIKaiQRETEFFRIIiJiCiokERExBRWSiIiYggpJRERMQYUkIiKmoEISERFTUCGJiIgpqJBERMQUVEgiImIKKiQRETE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N7e3pw5c4Y9e/ZQUlLC66+/TqNGjejduzevv/463t7e+Pr6kp6ezo4dOyrsLysri1/96leMHTuWoKAgANasWcPly5cZPHhwjeUuOH+BPfuz6dklTGUkIkI9KCSAQYMGkZmZyfz580lMTKSwsBBvb2+io6N56qmnLOutXr2aqVOnMn36dBwdHRk+fDhr1qyxfD4RQMuWLWnbti1LliwhPz+fhg0bEhoaytq1ayvccPFz/XDuAo08PfTckYjIf5nmtm97VFZWVu2cVyIi9kKFJCIipqBfz0VExBRUSCIiYgoqJBERMQUVkoiImIIKSURETEGFJCIipqBCEhERU1AhiYiIKaiQRETEFFRIIiJiCiokERExBRWSiIiYggpJRERMQYUkIiKmoEISERFTUCGJiIgpqJBERMQUVEgiImIKKiQRETEFFZKIiJiCCklERExBhSQiIqagQhIREVNQIYmIiCmokERExBRUSCIiYgoqJBERMYX/BWxo/KQ16xJXAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 538.279x204.68 with 1 Axes>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Alice measures z, Bob measures x\n",
    "\n",
    "hardy_circuit = QuantumCircuit(2)\n",
    "\n",
    "hardy_circuit.initialize(np.array([1, 1, 1, 0])/np.sqrt(3))\n",
    "hardy_circuit.h(1)\n",
    "\n",
    "hardy_circuit.measure_all()\n",
    "\n",
    "hardy_circuit.draw(output=\"mpl\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "ecc2f2c3",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcQAAAE6CAYAAACIxyJ2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAjN0lEQVR4nO3df5xWdZ338dcHC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x9+mLFjxwLw0Y9+lEceeQQonD7dtm0b/fr12z0fogRKPQ+RzPwm8M0Wlp3ZzPszm+sr7Y3q6+s577zzeOihh6ioqOCII47gpJNO2v4PFECfPn247rrr+OlPf9rs77j22msZM2bMm0Jv5syZXHXVVUybNo1bbrmFK6+8kssuu2x3fxyVSLdu3bjhhhs47rjjqK+vZ8aMGYwbN46bbroJgLPPPpu1a9dSVVXFpk2b6NKlC9dccw1Lly6ld+/eXH/99Zx++uls27aNkSNHcuuttwIwY8YMZsyYwfjx4+nevTvf/e53W30qtiMq2SjTUnOU6e7nKNPS25XRglA4VfaJT3yCL3zhC1x99dX87Gc/AwpTA/70pz8REaxevZrjjjtu+zB5aU/SUUaZStpFuzJaEOCCCy7g3/7t3+jS5c3/648fP557770XgLvvvvtN15ukvYWBKHUiuzJa8Gc/+xn9+/dn0qRJb1l2yy23cOONNzJp0iQ2b95M9+7dd7lWqbMp+TVESW/frowWfPzxx7n33nu5//77ef3119m0aRNnnHEGt99+O4cccggPPli4q+KyZcu47777dkv9UkdmIEqdSOPRgkOGDOHOO+/khz9s3X3uL7/88u3XHGfPns1VV13F7bffDsD69evp378/b7zxBl/96lc5++yzd9tnUMscs9CyUoxZMBClTmRXRwu25I477uDGG28EYPr06Xzyk58syeeROhJHme6E39ha5ihTqX35703L2uvfG0eZSpK0EwaiJEkYiJIkAQ6qkXYLrwW1zGvP6qg8QpQkCQNRkiTAQJQkCTAQJUkCDERJkgADUZIkwECUJAkwECVJAgxESZIAA1GSJMBAlCQJMBAlSQIMREmSAANRkiTAQJQkCTAQJUkCDERJkgADUZIkwECUJAkwECVJAgxESZIAA1GSJMBAlCQJMBAlSQIMREmSAANRkiTAQJQkCTAQJUkCDERJkgADUZIkwECUJAkwECVJAgxESZIAA1GSJMBAlCQJMBAlSQIMREmSAANRkiTAQJQkCTAQJUkCDERJkgADUZIkwECUJAkwECVJAgxESZKAMgRiRJwbESsj4vWIWBARR+2k/6ER8WhEbImI2oj454iIUtUrSdo7l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iRJgIEoSRJgIEqSBMD/B5Y333C+MYo4AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job = simulator.run(hardy_circuit, shots=1000)\n",
    "result = job.result()\n",
    "counts = result.get_counts(hardy_circuit)\n",
    "\n",
    "from qiskit.visualization import plot_histogram\n",
    "plot_histogram(counts)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ced67a68",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Likewise, when we run the circuit with Alice making an x-measurement and Bob making a z-measurement, there is no 10 term: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "6e53b4ee",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaQAAACoCAYAAACv+Zr6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAcCUlEQVR4nO3de1RVdeL38TeC3PEeKCgqN0EUENHUFPAyampaipaTPpNlGGIz2k17NCEbL5UTOjPpjK4uWjkm+BtzZnJMS3ks8slrjFfExkHIvJAGiCgCvz8cTyEoR4OzN/J5reVah3323t/PyeRz9j57f49dRUVFBSIiIgZrZHQAERERUCGJiIhJqJBERMQUVEgiImIKKiQRETEFFZKIiJiCCklERExBhSQiIqagQhIREVNQIYmIiCmokERExBRUSCIiYgoqJBERMQUVkoiImIIKSURETEGFJCIipqBCEhERU1AhiYiIKaiQRETEFByMDiAiDceRI0dqXOePf/wj06ZNu+U6wcHBtRVJTERHSCJiKm+++abREcQgKiQRETEFFZKIiJiCCklETCUtLc3oCGIQFZKIiJiCCklETCUuLs7oCGIQXfZtMkc/g8IzR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LbujQoTRr1oydO3da9cV9NysjgIsXL/Lee+8xbdo0HnnkETIzMy3baS67WuLn50dYWBgLFiygRYsW+Pj4kJaWxscffwygIyQRg7388stGR6i3oqKiANiyZUuN696qjK7bunUr06ZNs+y3rjW4U3aNGjUiNTWV0NBQEhISmDRpEq1atSIxMREHBwebHZrerrLyMq6UllB69QoAV0pLuFJaYtN3YyK2MG7cOKMj1FuhoaEAfP3117dcz5oyAixHWdf3W9ca3BESQFBQENu2bau0bOLEiYSEhODi4mJZVlpaSllZGeXl5ZSWllJSUoKTk5MhH1pu3fMei9dNsvw8/P9ey/nei/+mdYsONs8jUles+foJqd66devIzMysdHqtOvPnz6+xjADOnDnDggULuHDhQh2krapBFlJ1du/eTa9elb8V9Mknn2TVqlUA7NixA4B///vfdOjQwdbxGNLjMYb0eMzm44pI/fHBBx9Ytd5LL72Et7c3L7744i3vM7p06RKzZ8+urXg1anCn7KpTVFREVlZWlQsa3n33XSoqKir9MaKMRERqU2FhIePGjbPpTa/W0BES4O7uTllZmdExRIRrV45Jw6QjJBExleXLlxsdQQyiQhIRU0lISDA6ghhEhSQiplIXN1xK/aBCEhERU1AhiYiIKaiQRMRUdFNsw6VCEhFTWbdundERxCC6D8lkPDyNTiB3Sn93tSMpKUnz2VkpIiLitrf5JucUAH6+bSo9rutxraFCMplOA4xOICL1xZIlS257m+tfk7FoZnylx2agU3YiImIKKiQRMZVly5YZHUEMokISEVOx1XfviPmokETEVGJiYoyOIAZRIYmIiCmokERExBR02beI2ExwcHCN6yQlJVm1ntx9dIQkIqaSnJxsdAQxiApJRERMQYUkIiKmoEISERFTUCGJiIgpqJBERMQUVEgiImIKKiQRETEFFZKNnTx5koEDBxISEkKXLl148cUXjY4kIgbYvn07oaGhBAQEMHnyZMrKyoyOVKOnn36atm3b4uBQN3MqqJBszMHBgVdffZXDhw+zd+9eMjIy+Oijj4yOJSI2VF5ezuTJk0lNTSU7O5uCggLef/99o2PV6OGHH2bPnj11tn8Vko21adOGqKgoABwdH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+QKauLvpviMRkf8yzWXfDVF5eXmNc16JiDQUKiQRETEFvT0XERFTUCGJiIgpqJBERMQUVEgiImIKKiQRETEFFZKIiJiCCklERExBhSQiIqagQhIREVNQIYmIiCmokERExBRUSCIiYgoqJBERMQUVkoiImIIKSURETEGFJCIipqBCEhERU1AhiYiIKaiQRETEFFRIIiJiCiokERExBRWSiIiYggpJRERMQYUkIiKmoEISERFTUCGJiIgpqJBERMQU/heUav5DfqVDmgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 538.279x204.68 with 1 Axes>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Alice measures x, Bob measures z\n",
    "\n",
    "hardy_circuit = QuantumCircuit(2)\n",
    "\n",
    "hardy_circuit.initialize(np.array([1, 1, 1, 0])/np.sqrt(3))\n",
    "hardy_circuit.h(0)\n",
    "\n",
    "hardy_circuit.measure_all()\n",
    "\n",
    "hardy_circuit.draw(output=\"mpl\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "883efe9f",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcQAAAE9CAYAAACVwhLOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAjLklEQVR4nO3dfZyVdZ3/8dcHCEKRlRu5HZB75CZHx0GaIrA1f7puq2WuZjerIvIzzTLXzH5bm7XrzabbA9Mtyq203LSs36a7raaLi0gRNkxRyAo8AhRIIG78gYIg4+f3x5lhh3FGZmTmnBl4PR+PeXjO97quM5/juZj3ub7X93tdkZlIknSk61LqAiRJ6ggMREmSMBAlSQIMREmSAANRkiTAQJQkCTAQJUkCShCIEXFlRKyJiFciYklEvOsg658ZEYsiYmdEb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wECVJAgxESZIAA1GSJMBAlCQJMBAlSQIMREmSAANRkiTAQJQkCTAQJUkCDMSSevTRRxk/fjxjxozh1ltvbXKd+fPnc9JJJzFp0iRmzJgBwIoVKzjppJP2//Tu3Zs5c+YcsN3tt99ORLBly5b2fhuSdFjoVuoCjlS1tbVcddVVPP7445SVlTFlyhTOOeccJk6cuH+dF198kSuvvJJHH32U4cOHs3nzZgDGjx/Pb37zm/2vM3ToUN7//vfv327dunU8/vjjDB8+vKjvSZI6M48QS+Tpp59mzJgxjBo1iu7du/PBD36Qhx566IB1vv/973PeeeftD7YBAwa87nXmzZvH6NGjOf744/e3fepTn+LLX/4yEdG+b0KSDiMGYols2LCBYcOG7X9eVlbGhg0bDlhn5cqVbN++ndNOO41TTjmF7373u697nQceeICLLrpo//OHH36YoUOHUl5e3n7FS9JhyC7TEsnM17U1PqLbt28fS5YsYd68eezevZuqqire/va3M27cOAD27t3Lww8/zC233ALArl27uOmmm3jsscfa/w1I0mHGQCyRsrIy1q1bt//5+vXrGTJkyOvW6d+/P0cffTRHH30006dPZ+nSpfsD8ZFHHqGiooKBAwcC8Pvf/541a9bsPzpcv349FRUVPP300wwaNKhI70ySOie7TEtkypQprFq1ijVr1rB3714eeOABzjnnnAPWOffcc3nqqafYt28fu3btYvHixUyYMGH/8vvvv/+A7tK3ve1tbN68mbVr17J27VrKysqoqakxDCWpBTxCLJFu3bpx1113ceaZZ1JbW8vMmTOZNGkSc+fOBeCKK65gwoQJnHXWWZx44ol06dKFWbNmMXnyZKDQPfr444/zjW98o5RvQ5IOG9HUuazDQWVlZVZXV5e6DElSBxIRSzKzsqlldplKkoSBKEkSYCBKkgQYiJIkAQaiJEmAgShJEmAgSpIEGIiSJAEGoiRJgIEoSRJgIEqSBBiIkiQB3u3ioC6fU+oKOq67ryl1BZLUdjxClCQJA1GSJMBAlCQJMBAlSQIMREmSAANRkiTAQJQkCTAQJUkCDERJkgADUZIkwECUJAkwECVJAgxESZIAA1GSJMBAlCQJMBAlSQ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TOfatD+BeCizDzhINu/E3gE+Exmfv1gv6+ysjLrd8hDcfmcQ36Jw9bd15S6giPPokWLuPHGG/nZz34GwC233ALAZz/7ujMO3HjjjfTq1YvrrrsOgB07dlBeXs7q1auJiAPWveCCC5g9ezbveU+LvpuqE3r00Uf55Cc/SW1tLbNmzeKGG244YPmzzz7LpZdeSk1NDTfddNP+/QYKPQuzZs1i2bJlRATf/va3qaqqYtu2bVx44YWsXbuWESNG8MMf/pA+ffoU+621SkQsyczKppYVc1DNFqAWGNSofQCvP2o8QERMoxCGf9uSMJQOVxs2bNh/NAhQVla2/5v4waxevZrjjjuOSy+9lJNPPplZs2bx8ssvA7By5Uqeeuoppk6dyowZM/jVr37VLvWrNGpra7nqqqt45JFHWL58Offff//+I7Z6ffv25atf/eoBQVjvk5/8JGeddRbPPvssS5cuZcKECQDceuutnH766axatYrTTz+9yS78zqRogZiZe4ElwBmNFp1BYbRpkyJiOoUw/GJmzmm3AqVOoKkencZHe83Zt28fNTU1fOxjH+PXv/41Rx999P4/YPv27WP79u388pe/5LbbbuOCCy5o8nepc3r66acZM2YMo0aNonv37nzwgx/koYceOmCdAQMGMGXKFN7ylrcc0L5jxw4WLFjAZZddBkD37t059thjAXjooYe4+OKLAbj44ov5yU9+0u7vpT0Vex7iV4BLImJWREyIiDuAIcBcgIi4JSLm1a8cEadRCMO5wL9ExKC6n+OKXLfUIZSVle0/vwOwfv16hgwZ0uJty8rKmDp1KgDnn3/+/nNUZWVlnHfeeUQEp556Kl26dGHLli1t/wZUEu3Vs7Bp0yYGDx4MwODBg/efr+usihqImfkD4Brgc8BvgGnA2Zn5XN0qgzlwFMslwFHAdcALDX7sz9ERacqUKaxatYo1a9awd+9eHnjgAc4555wWbTto0CCGDRu2f2DCvHnzmDhxIgDve9/7eOKJJ4BC9+nevXvp379/+7wJFV179Swcboo9D5HM/BrwtWaWXdLE80uaWlc6EnXr1o277rqLM888k9raWmbOnMmkSZOYO3cuAFdccQUbN26ksrKSHTt20KVLF+b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Z6U2S1ayIOBa4hMJ5n5OAncAeCueJbsnMw7brS29OcyOPI+IooAb4Tmb+Q/ErKw4DsYOpuwXWJODfKARiX6AcOIFCMP6f+sESUkN1PQo7G/5BqztifCvQC5gMvGwQqqGm9psm1nkrhUE399fd7P2wZCB2IHXdFDspdEssaNA2HJgKzAJGAX+Zmb8uWaHqkCLiGxSO/p6mMJdsRxPr9MnM7c5BVL0W7jfHZuaLxa6t2BxU07FMBNYA+7+BZcFzmflDCiO+XgQuKE156qgi4iLgcuAfgYcoDJc/LyLG1J0bIiJ6Ad+pG7VsGKq5/eb9ETG6wX7TE7g3IiaXsNSi8AixA6nb8f6dwqW2/gr4fWa+1midq4HLMvOk4leojioi7gZqKYwAPA+4GBgNrAD+A5hHYbL+HZnZvVR1qmNxvzmQgdjBRMTbgbkULrP1DQo75LbMfLnuxPZ3gVcy8yMlLFMdSN3cw+uB3pl5Q4P2SRS+/Z9P4TzisRQm7F9WijrVsbjfvJ6B2AHVdU18HjiHwh0uFgF/BN4DvADMyszfla5CdTQR0QcYWHeN0u7Aq40G11wI3A9UZOZvSlSmOhj3mwN1K3UBer3MXAZcWDcF48+B9wFHA3cDD2bmsyUsTx1QZm4Httc93gv7R5hG3aT83hR6Fn5TsiLV4bjfHMgjxE4iIro0Pp8otVREXAt0zczbSl2LOo8jbb8xEKUjQN3dCWr9UqXWONL2GwNRkiSchyhJEmAgSpIEGIiSJAEGoiRJgIEoSRJgIEqSBMD/B/zQpKsRY3dFAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job = simulator.run(hardy_circuit, shots=1000)\n",
    "result = job.result()\n",
    "counts = result.get_counts(hardy_circuit)\n",
    "\n",
    "from qiskit.visualization import plot_histogram\n",
    "plot_histogram(counts)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1819167e",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "Now what if we put our conclusions from these two quantum circuits together? We know at least one person—either Alice or Bob—would get 0 if we measure them in the z-basis, and we know that if one of them measures 0 in the z-basis, then the other must have |+>. Classical Carol's intuitive conclusion was that at least one of Alice and Bob's qubits must be in the |+> state. So now let's see what happens if we let them both do x-basis measurements, and run the circuit. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "b8d031aa",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaQAAACoCAYAAACv+Zr6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAciklEQVR4nO3de1hUdeI/8Df3u6gQyEVQbnK/a2jKgJqY11TE3PS7mYohWFiZ9sMENRUvCdaqu/p00co1Lrvq7uqaFvC10F+iEuEN0VyEzAtqgIjCwPcP1qkRlNFm5nNg3q/n8XmGM+ecz3syec85c85n9FpaWlpAREQkmL7oAERERAALiYiIJIKFREREksBCIiIiSWAhERGRJLCQiIhIElhIREQkCSwkIiKSBBYSERFJAguJiIgkgYVERESSwEIiIiJJYCEREZEksJCIiEgSWEhERCQJLCQiIpIEFhIREUkCC4mIiCSBhURERJJgKDoAEemOM2fOdLjOn/70JyQlJT1yHW9vb3VFIgnhERIRScrGjRtFRyBBWEhERCQJLCQiIpIEFhIRSUpOTo7oCCQIC4mIiCSBhUREkhIbGys6AgnCy74l5uzXQO1V0SnoSVjZAf2Gqm9/fysCqm6qb3+Pw6kHMDFczNgiJCcno7i4WMjYwcHByMzMFDK21LCQJKb2KnCrUnQKkoKqm8B5vjnRiuLiYhQUFIiOofN4yo6IJCUxMVF0BBKEhUREktLRLA3UdbGQiEhSIiMjRUcgQVhIRCQp165dEx2BBGEhERGRJLCQiEhSfH19RUc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ICEhAbW1tbCzs0NoaChmz56tWG/Hjh1ISkpCcnIyDAwMMGbMGOzcuVPx/UQA0KtXL7i6uiIzMxNVVVUwMjKCj48PsrKylC64+L1u3KxBN0sL3ndERPRfkrnsWxc1Nzd3OOcVEZGuYCEREZEk8O05ERFJAguJiIgkgYVERESSwEIiIiJJYCEREZEksJCIiEgSWEhERCQJLCQiIpIEFhIREUkCC4mIiCSBhURERJLAQiIiIklgIRERkSSwkIiISBJYSEREJAksJCIikgQWEhERSQILiYiIJIGFREREksBCIiIiSWAhERGRJLCQiIhIElhIREQkCSwkIiKSBBYSERFJAguJiIgkgYVERESS8H804is/mRUiiwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 538.279x204.68 with 1 Axes>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Alice measures x, Bob measures x\n",
    "\n",
    "hardy_circuit = QuantumCircuit(2)\n",
    "\n",
    "hardy_circuit.initialize(np.array([1, 1, 1, 0])/np.sqrt(3))\n",
    "hardy_circuit.h(0)\n",
    "hardy_circuit.h(1)\n",
    "\n",
    "hardy_circuit.measure_all()\n",
    "\n",
    "hardy_circuit.draw(output=\"mpl\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "bf7614ee",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcQAAAE6CAYAAACIxyJ2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAl20lEQVR4nO3de3xV5Z3v8c+PpCBXBZRLSBAiN0kkGGNDKkIvcilaOqJWkU5rvVC19XI8OtrTOh2d8Ta2ChaVkRlFqxVr1YNV8Fj1QEBjmBCJDSjGEhCigAJKuBhM/M0faycNIYFss7N2kv19v1683HutZ+38Nk/wu9eznmdtc3dEREQSXad4FyAiItIWKBBFRERQIIqIiAAKRBEREUCBKCIiAigQRUREAEiOdwGt5dhjj/UhQ4bEuwwREWlDVq9e/Ym7H9fYvg4biEOGDKGoqCjeZYiISBtiZpua2qchUxERERSIIiIigAJRREQEUCCKiIgACkQRERFAgSgiIgIoEEVERAAFooiICKBAFBERARSIIiIigAJRREQEUCCKiIgACkQRERFAgSgiIgIoEEVERAAFooiICKBAFBERARSIIiIigAJRREQEUCCKiIgACkQRERFAgSgiIgIoEFvFSy+9xMiRIxk2bBh33nnnIfvvvvtuxo4dy9ixY8nMzCQpKYmdO3cCMGTIEE466STGjh1LTk5O3TFr1qxh3LhxddtXrVoV2vsREUkI7t4h/5xyyikeD9XV1Z6enu5/+9vfvKqqyseMGeNr165tsv3zzz/v3/rWt+qeH3/88f7xxx8f0m7SpEm+ZMkSd3d/8cUXfeLEiTGvXUSkowOKvInc0BlijK1atYphw4aRnp5O586dueCCC1i8eHGT7Z988klmzpx5xNc1M3bv3g3AZ599RkpKSsxqFhERSI53AR1NRUUFaWlpdc9TU1MpLCxstO2+fft46aWXmDdvXt02M2Py5MmYGT/96U+ZPXs2AHPmzGHKlClcf/31fPnll7zxxhut+0ZERBJM6GeIZnalmZWb2edmttrMTj9C+ylmVmBmlWb2iZktNrMRYdUbreCM/GBm1mjbP//5z5x22mn06dOnbtvrr79OcXExS5cu5f777yc/Px+ABx98kHvvvZfNmzdz7733cskll7TOGxARSVChBqKZnQ/MBW4HTgbeAJaa2eAm2g8FFgMrIu3PALoCS0Ip+CtITU1l8+bNdc+3bNnS5PDmokWLDhkurW3br18/zj777LrJM48++igzZswA4LzzztOkGhGRGAv7DPE6YKG7L3D3d9z9KuAj4Iom2p8CfA34hbu/7+5rgDuAE8zs2FAqjtKpp55KWVkZ5eXlHDhwgEWLFjF9+vRD2n322WcsX76c73//+3Xb9u7dS2VlZd3jl19+mczMTCAIyuXLlwPw2muvMXz48BDejYh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ideuqplJWVUV5ezoEDB1i0aBHTp08/qM306dN57LHHcHfefPNNjj76aAYOHAjA9u3bAfjggw949tlnmTlzJhAMj9911108//zzdOvWLdw3Je2aAlE6vJYMze3atYvFixdTXl7Ohx9+yN69e3n88cfr2tx2221s3ryZWbNmMW/evNgX34ElJyczb948pkyZwoknnsgPfvADMjIymD9/PvPnzwdg2rRppKenM2zYMC677DIeeOCBuuPPOeccRo8ezfe+9z3uv/9+evfuDcDPf/5zKisrmTRpEmPHjuXyyy+Py/uT9if5yE1E2reWDM298sorDB06lOOOOw6AGTNm8MYbb/DDH/7woOMvvPBCzjzzTG655ZZWfCcdz7Rp05g2bdpB2+oHmJlx//33N3rsihUrGt3+/vvvx67ABPTSSy9xzTXXUFNTw6WXXspNN9100H5355prrmHJkiV069aNhQsXkp2dDcCnn37KpZdeSmlpKWbGww8/TF5eHueffz7r16+va3PMMcewZs2asN/aEekMUTq8lgzNDR48mDfffJN9+/bh7rz66quceOKJAHXr3gCef/55Ro0aFer7Eom1lkxAA7jmmmuYOnUq7777LiUlJXX/Vp566inWrFnDmjVrOOecc5gxY0ao76u5dIYoHV79obmamhouvvjiuqE5CM5Ipk2bxpIlSxg2bBjdunXjkUceASA3N5dzzz2X7OxskpOTOfnkk5k9ezYAN910E+vXr6dTp04cf/zxda8n0l7Vn4AG1E1AGz16dF2bpiagde/enfz8fBYuXAhA586d6dy580Gv7+788Y9/5LXXXgvtPUVDgSgJoSVDc7fcckujQ6HPPPNMbIts5y6bE+8KYmfBtfGuID4am1xWWFh4xDYVFRUkJydz3HHH8ZOf/ISSkhJOOeUU5s6dS/fu3evarlixgv79+x80I7gt0ZCpiIgALZuAVl1dTXFxMVdccQVvvfUW3bt3P+QmGE8++WTdbOC2SIEoIiJAyyagpaamkpqaSm5uLgDnnnvuQXd8qq6u5tlnn+X8889v5Xfx1WnIVNqljjI8l6hDc9I21Z+ANmjQIBYtWsQf/vCHg9pMnz6defPmccEFF1BYWHjQ2tC0tDTWr1/PyJEjef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p4AL1S7jM7D8Izv5WEax3291Im96Ra75agxiCZvbJMe7+adi1xYpmmYZjNFAO1H1i8sAmd/8jwQytT4EfxKe8hNVUv3zg7k8T9Esl6pdQmdlMgg8jvwUWA3eb2QwzGxa5foWZ9QAeiczUVhi2sib65GwzO6Fen3QFHjWzzDiW2iI6QwxB5BflBYJ1bD8iWDf1ZYM2VxGscRsbfoWJSf3SNpnZAqCGYL3uDODHBF8cvh5YArxKsFh/rrt3jlediSRR+kRniCFw9/3AL4GuwGPAj8wszcy6Q92F6IkEa64kJOqXtiey9rAc+NTdN7j7b9z9JOBUglu1/ZhgXejvgN/Hr9LEkUh9ojPEEEWGEm4GphN8w0UB8DFwBsHMxkvd/a/xqzAxqV/alsh9ZftH7lHaGfiiweSa84EngWx3XxOnMhNKovSJAjEOIlP9zwT+gWD5RSnwtLu/G8+6Ep36pe2KzDA1d68xs8sIhua6xbuuRNYR+0SBGGe1C7/jXYccTP3SdpnZdUCSu98d71ok0FH6RIEoIu1K5DZ7NfrA0nZ0lD5RIIqIiKBZpiIiIoACUUREBFAgioiIAApEERERQIEoIiICKBBFREQA+B9Z2Wy8Y6ln2gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "job = simulator.run(hardy_circuit, shots=1000)\n",
    "result = job.result()\n",
    "counts = result.get_counts(hardy_circuit)\n",
    "\n",
    "from qiskit.visualization import plot_histogram\n",
    "plot_histogram(counts)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f1909129",
   "metadata": {
    "slideshow": {
     "slide_type": "skip"
    }
   },
   "source": [
    "We have a problem! There is some chance that we measure the outcome 11, corresponding to the |--> state, which contradicts our conclusion! \n",
    "\n",
    "This contradiction has drastic physical consequences in Hardy's original setup. According to classical Carol, we can only get the |--> state if neither Alice nor Bob would have got 0 if measured in the z-basis. This implies that the qubits were in the |11> state, which we said corresponds to a particle and antiparticle having gone down the same path, which is impossible - they should have annhililated each other.\n",
    "\n",
    "Hardy pointed out that Carol made an important classical assumption when she deduced that at least one person, either Alice or Bob, would get |+>. She assumed that Alice measuring her qubit will make no difference to Bob's qubit, which would be true classically. One resolution to the paradox is that Alice choosing to make an z-basis or x-basis measurement actually \"non-locally\" affects Bob's measurement outcomes, and vice-versa. However, the correct way of understanding the solution to the paradox, and the physical meaning of non-locality more generally, remains under debate.  \n",
    "\n",
    "So our game of two quantum truths and a lie reveals some strange quantum truths about non-locality. And this doesn't just work for the special entangled state I used for my game, but almost all entangled qubits. Can you create your own quantum lie detector, to tell the difference between two truths and a classically convincing lie?"
   ]
  }
 ],
 "metadata": {
  "celltoolbar": "Slideshow",
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
